package com.upcode.weighing.vo.node;

import java.util.List;

public class BaseTreeNode<T> {

    /**
     * 新版本树形
     */
    private String nodeId;

    private String code;

    private String title;

    private String type;

    private List<T> children;

    private boolean hasChild;

    private boolean checked;

    /**
     * 映射字段兼容老版本
     */
    private String name;
    private String id;
    private String pid;
    private String topId;
    private List<T> child;

    public BaseTreeNode() {
    }

    public BaseTreeNode(String nodeId, String name, String type) {
        this.nodeId = nodeId;
        this.title = name;
        this.type = type;
    }

    public BaseTreeNode(String nodeId, String name) {
        this.nodeId = nodeId;
        this.title = name;
    }

    public BaseTreeNode(String nodeId, String code, String name, String type) {
        this.nodeId = nodeId;
        this.code = code;
        this.title = name;
        this.type = type;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public List<T> getChildren() {
        return children;
    }

    public void setChildren(List<T> children) {
        this.children = children;
        this.child = children;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getTopId() {
        return topId;
    }

    public void setTopId(String topId) {
        this.topId = topId;
    }

    public List<T> getChild() {
        return child;
    }

    public void setChild(List<T> child) {
        this.child = child;
    }

    public boolean isHasChild() {
        return hasChild;
    }

    public void setHasChild(boolean hasChild) {
        this.hasChild = hasChild;
    }
}
